home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
os2tools
/
bnklysrc
/
b_whack.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-13
|
6KB
|
132 lines
/*--------------------------------------------------------------------------*/
/* */
/* */
/* ------------ Bit-Bucket Software <no-Inc> */
/* \ 10001101 / Writers and Distributors of */
/* \ 011110 / No-Cost<no-tm> Software. */
/* \ 1011 / */
/* ------ */
/* */
/* Copyright (C) 1987, 1988, 1989 by Robert Hartman and Vincent Perriello */
/* */
/* */
/* This module was written by Bob Hartman */
/* */
/* */
/* BinkleyTerm FTSC Mail Session Routines */
/* */
/* */
/* For complete details of the licensing restrictions, please refer */
/* to the License agreement, which is published in its entirety in */
/* the MAKEFILE and BT.C, and also contained in the file LICENSE.210. */
/* */
/* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE */
/* BINKLEYTERM LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF */
/* THIS AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO */
/* NOT HAVE THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHORS */
/* AT THE ADDRESSES LISTED BELOW. IN NO EVENT SHOULD YOU PROCEED TO */
/* USE THIS FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE */
/* BINKLEYTERM LICENSING AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU */
/* ARE ABLE TO REACH WITH THE AUTHORS. */
/* */
/* */
/* The Authors can be reached at the following addresses: */
/* */
/* Robert C. Hartman Vincent E. Perriello */
/* Spark Software VEP Software */
/* 427-3 Amherst Street 111 Carroll Street */
/* CS2032, Suite 232 Naugatuck, CT 06770 */
/* Nashua, NH 03061 */
/* */
/* FidoNet 1:132/101 FidoNet 1:141/491 */
/* Data (603) 888-8179 Data (203) 729-7569 */
/* */
/* Please feel free to contact us at any time to share your comments */
/* about our software and/or licensing policies. */
/* */
/*--------------------------------------------------------------------------*/
#include <ctype.h>
#include <conio.h>
#include <string.h>
#define WAZOO_SECTION
#define MATRIX_SECTION
#include "com.h"
#include "xfer.h"
#include "zmodem.h"
#include "keybd.h"
#include "sbuf.h"
#include "sched.h"
#include "externs.h"
#include "prototyp.h"
int Whack_CR ()
{
long t1, t2, timerset ();
unsigned char j;
char m;
int l;
unsigned int i;
char buf[80];
t1 = timerset (3000); /* set 30 second timeout */
j = CR;
strcpy (buf, "Intro: ");
l = strlen (buf);
m = 0;
while (!timeup (t1) && CARRIER) /* till then or CD lost */
{
/* Send either the CR or SPACE */
SENDBYTE (j);
/* Now switch to either CR or SPACE based on last output */
j = (unsigned char) (45 - j);
/* Now read what we get back to see if we get anything useful */
while (((i = TIMED_READ (0)) != (unsigned int)EOF) && (!timeup (t1)) && CARRIER)
{
if (i == CR)
{
if (m)
{
if (un_attended && fullscreen)
{
clear_filetransfer ();
sb_move (filewin, 1, 2);
sb_puts (filewin, buf);
sb_show ();
}
else
{
set_xy (NULL);
scr_printf (buf);
}
/* We got what we wanted */
/* Now try to stop output on an Opus */
SENDBYTE ('');
return (0);
}
}
else if (i >= ' ')
{
buf[l++] = (char) (i & 0xff);
buf[l] = '\0';
if (l > 70)
l = 70;
m = 1;
}
}
/* Delay for a second */
t2 = timerset (100);
while (!timeup (t2))
time_release ();
}
status_line ("*Nobody answered the door");
return (-1);
}